import type {
  SysLogOperationPageQo,
  SysLogOperationVo,
} from '@/typings/system/log/operation'
import { http } from '@/utils/request/index'

/**
 * 获取操作日志分页列表
 * @param params 查询参数
 * @returns 操作日志
 */
export function getLogOperationPageListApi(params: SysLogOperationPageQo) {
  return http.request<PageResult<SysLogOperationVo>>('get', '/admin-api/system/sysLogOperation/sysLogOperationPage', {
    params,
  })
}

/**
 * 删除操作日志
 * @param idList 操作日志id列表
 * @returns 操作日志id
 */
export function deleteLogOperationApi(idList: string[]) {
  return http.request<string>('post', '/admin-api/system/sysLogOperation/sysLogOperationRemove', {
    params: {
      idList: idList.join(','),
    },
  })
}
